<?php

class GlobalConfig
{

    /**
     *
     * @var GlobalConfig
     */

    private static $instance;
    /**
     *
     * @var Zend_Config
     */
    private $config;

    /**
     * 
     */

    private function __construct()
    {
        $front = Zend_Controller_Front::getInstance();

        $bootstrap = $front->getParam('bootstrap');

        $application = $bootstrap->getApplication();

        $this->config = new Zend_Config($application->getOptions());
    }
    
    /**
     *
     * @return Zend_Config
     */

    public function getConfig()
    {
        return $this->config;
    }

    /**
     *
     * @return GlobalConfig
     */
    public static function getInstance()
    {
        if (!isset(self::$instance))
        {
            // pomocne promenne o nasi aplikaci


            $c = __CLASS__;
            self::$instance = new $c();
        }

        return self::$instance;
    }

}